#include<iostream>
#include<string>
#include<memory>
class lendhouse{
  public:
     virtual void  lend()=0;

};

class lendlord:public lendhouse{

  public:
   void lend()override{

     std::cout<<"房东租房交付成功"<<std::endl;
   }
};

class interdiary:public lendhouse{
   
    public:
     interdiary():_plord(new lendlord()) { }
 void lend()override{
    std::cout<<"发布启事"<<std::endl;
    std::cout<<"带人看房"<<std::endl;
   _plord->lend();
   std::cout<<"租后维修"<<std::endl;

 }

     private:
      lendlord * _plord;
};
int main(){
   std::shared_ptr<lendhouse> pi(new interdiary() );
   pi->lend();
    return 0;
}